package com.central.apps.service;


import com.central.apps.entity.BizFlowConsult;
import com.central.apps.entity.BizFlowCountersign;
import com.central.common.web.PageResult;

import java.util.Map;

public interface CustomizationService {

    PageResult<Map<String, Object>> findPage(Map<String, Object> params, String sql) throws Exception;

    void setCountersign(BizFlowCountersign bizFlowCountersign) throws Exception;

    /**
     * 设置意见征询配置信息
     *
     * @param bizFlowConsult
     * @throws Exception
     */
    void setConsult(BizFlowConsult bizFlowConsult) throws Exception;

    /**
     * 获取意见征询配置信息
     *
     * @param app
     * @param id
     * @return
     */
    Map<String, Object> getConsult(String app, Long id) throws Exception;

    String getAgentType(Map<String, Object> params) throws Exception;

    /**
     * 判断是否存在意见征询信息
     *
     * @param params
     * @throws Exception
     */
    String judgeIsConsult(Map<String, Object> params) throws Exception;

    /**
     * 判断意见征询是否完成
     *
     * @param params
     * @throws Exception
     */
    boolean judgeConsultFinished(Map<String, Object> params) throws Exception;

    /**
     * 更新意见征询配置信息
     *
     * @param params
     * @throws Exception
     */
    void updateConsultInfo(Map<String, Object> params) throws Exception;

    String getCurrentAgentType(Map<String, Object> params) throws Exception;

    /**
     * 获取流程按钮判断逻辑
     *
     * @param app
     * @param id
     * @return
     * @throws Exception
     */
    Map<String, Object> btnJudgeLogic(String app, Long id) throws Exception;

    /**
     * 判断意见征询执行人是否删除
     *
     * @param params
     * @return
     * @throws Exception
     */
    String judgeConsultExecutors(Map<String, Object> params) throws Exception;

    /**
     * 根据部门树过滤数据
     *
     * @param app
     * @param params
     * @return
     */
    PageResult<Map<String, Object>> findList(String app, Map<String, Object> params) throws Exception;
}
